package edu.biwu.utils;

import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;

import java.io.InputStream;

/**
 * @author 王俊彪
 * @version 1.0
 */
public class SqlSessionFactionUtils {
    private SqlSessionFactionUtils() {
    }

    public static SqlSessionFactory generateSqlsessionFactory(){
        InputStream is = SqlSessionFactionUtils.class.getClassLoader().getResourceAsStream("SqlMapConfig.xml");
        return new SqlSessionFactoryBuilder().build(is);
    }
}
